﻿using BCCommon.TMS.Insured;
using BCEntity.TMS.InsuredConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.InsuredConfig
{
    /// <summary>
    /// 保价配置
    /// </summary>
    public interface IInsuredConfigData
    {
        /// <summary>
        /// 添加保价配置
        /// </summary>
        /// <param name="entity">保价配置信息</param>
        /// <returns></returns>
        Task<InsuredConfigEntity> Insert(InsuredConfigEntity entity);

        /// <summary>
        /// 获取保价配置
        /// </summary>
        /// <param name="insuredConfigId">保价配置Id</param>
        /// <returns></returns>
        Task<InsuredConfigEntity> GetEntity(int insuredConfigId);

        /// <summary>
        /// 更新保价配置
        /// </summary>
        /// <param name="entity">保价配置信息</param>
        /// <returns></returns>
        Task<InsuredConfigEntity> Update(InsuredConfigEntity entity);

        /// <summary>
        /// 删除保价配置
        /// </summary>
        /// <param name="insuredConfigId">保价配置Id</param>
        /// <returns></returns>
        Task<int> Delete(int insuredConfigId);

        /// <summary>
        /// 获取保价配置
        /// </summary>
        /// <param name="insuredType">保价类型</param>
        /// <param name="vehicleTransportBusinessConfigId">车辆运输业务配置ID</param>
        /// <param name="createStartDate">创建开始日期</param>
        /// <param name="createEndDate">创建结束日期</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<InsuredConfigViewEntity>, int)> Query(InsuredType? insuredType, int? vehicleTransportBusinessConfigId, DateTime? createStartDate, DateTime? createEndDate, int pageIndex, int pageSize);

        /// <summary>
        /// 获取保价配置列表
        /// </summary>
        /// <param name="insuredType">保价类型</param>
        /// <param name="vehicleTransportBusinessConfigId">车辆运输业务配置ID</param>
        /// <returns></returns>
        Task<IEnumerable<InsuredConfigViewEntity>> GetList(InsuredType? insuredType, int? vehicleTransportBusinessConfigId);
    }
}
